package com.gss.armory.domain;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.Id;
import javax.persistence.Table;

import com.gss.common.domain.CommonDetailsDTO;

@Entity
@Table(name="DOC_LINK_VALUES")
public class DocumentLinkDTO extends CommonDetailsDTO implements Serializable{
	public enum DocLinkType {
		General,Renewal,VersionChange,Suspunded
	};
	private long parentDocId;
	private long linkedDocId;
	private DocLinkType linkType;
	
	@Id
	@Column(name="PARENT_DOCUMENT_ID")
	public long getParentDocId() {
		return parentDocId;
	}
	@Id
	@Column(name="LINKED_DOCUMENT_ID")
	public long getLinkedDocId() {
		return linkedDocId;
	}
	@Column(name="DCUMENT_LINK_TYPE")
	@Enumerated(value=EnumType.STRING)
	public DocLinkType getLinkType() {
		return linkType;
	}
	public void setParentDocId(long parentDocId) {
		this.parentDocId = parentDocId;
	}
	public void setLinkedDocId(long linkedDocId) {
		this.linkedDocId = linkedDocId;
	}

	public void setLinkType(DocLinkType linkType) {
		this.linkType = linkType;
	}
	@Override
	public String toString() {
		return "DocumentLinkDTO [parentDocId=" + parentDocId + ", linkedDocId="
				+ linkedDocId + ", linkType=" + linkType + "] \n";
	}
	
	
}
